package com.wang.server;

import com.wang.thread.LeakyBucketTimer;
import com.wang.thread.ServerThread;
import com.wang.thread.SetTokenTimer;
import com.wang.util.LeakyBucket;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * 模拟服务器接受请求
 * Created by wang on 2017/5/3.
 */
public class Server {
    //处理请求
    public static void doService(Socket socket) {
        Thread thread = new Thread(new ServerThread(socket));
        thread.start();
    }
}
